package com.retail.lottery.colalottery.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class StartupLogger implements ApplicationListener<ApplicationReadyEvent> {

    @Value("${jar-version:'no version'}")
    private String ymlEncryptFlag;

    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        // 添加你的自定义日志代码
        log.info("应用启动并准备就绪时自定义日志->{}", ymlEncryptFlag);
    }
}
